-- GENERATED SPELL FOR [Shimmerwing Moth] --


function spell0_20611(pUnit, Event) --@Shimmerwing Dust,n/a--
pUnit:FullCastSpellOnTarget(36592,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20611', 5000, 1)
end

function spell1_20611(pUnit, Event) --@Wing Buffet,Self--
pUnit:FullCastSpellOnTarget(32914,pUnit)
pUnit:RegisterEvent('Sorts_20611', 1000, 1)
end

function Sorts_20611(pUnit, Event)
local choix_sorts_20611 = math.random(0, 1)
if choix_sorts_20611 == 0 then
pUnit:RegisterEvent('spell0_20611', 1, 1)
end
if choix_sorts_20611 == 1 then
pUnit:RegisterEvent('spell1_20611', 1, 1)
end
end

function mob20611_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20611', math.random(1500, 3000), 1)
end

function mob20611_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20611_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20611_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20611, 1, 'mob20611_Action')
RegisterUnitEvent(20611, 2, 'mob20611_Leave')
RegisterUnitEvent(20611, 3, 'mob20611_Kill')
RegisterUnitEvent(20611, 4, 'mob20611_Die')
